<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<script src="./qwebchannel.js"></script>
<script src="echarts.min.js"></script>
<style type="text/css">
    html,body{height:100%;width:100%;margin:0px;padding:0px;}
    #map{height:100%;width:100%;}}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=9GqzBZjfGqXYXMzdfuRN9AL4B4PHaY6R"></script>
</head>
<body>
    <div id="map"></div>
</body>
</html>
<script type="text/javascript">
    var map = new BMap.Map("map",{minZoom:5,maxZoom:18,enableMapClick:false});
    map.centerAndZoom(new BMap.Point(116.331398,39.897445),15);

    map.enableDragging();
    map.enableScrollWheelZoom();
    map.disableDoubleClickZoom();
    var ctrlNav = new BMap.NavigationControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE});
    map.addControl(ctrlNav);


    var lat  = 40;
    var lng  = 121;
    var zoom = 16;
    var myChart = echarts.init(document.getElementById('main'));
    function setGaugeValue(lng_value, lat_value,zoom_value){
    lng = lng_value;
    lat = lat_value;
    zoom = zoom_value;
    theLocation();
    }

// 用经纬度设置地图中心点
function theLocation(){

        map.clearOverlays();
        var new_point = new BMap.Point(lng,lat);
        var marker = new BMap.Marker(new_point);  // 创建标注
        map.centerAndZoom(new_point,zoom)
        map.addOverlay(marker);              // 将标注添加到地图中
        map.panTo(new_point);

}
</script>
